#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <set>

using namespace std;

class Solution {
    public:
        int uniquePaths(int m, int n) {
            vector<vector<int> > dp(m+1, vector<int>(1+n, 0));
            for (int i = 1; i <=m; i++) {
                for (int j = 1; j <= n; j++) {
                   if (i == 1 & j == 1) dp[i][j] = 1;
                   else dp[i][j] = dp[i-1][j] + dp[i][j-1]; 
                }
            }
            return dp[m][n];                        
        }
};

//test in 1337 online judge and pass all the test
int main(int argc, char **argv)
{
    Solution mySolution;
    int result;

    cout << "-----------------Test 1--------------------" << endl;
    result = mySolution.uniquePaths(2,2); 
    cout << result << endl;

    cout << "-----------------Test 2--------------------" << endl;


    cout << "-----------------Test 3--------------------" << endl;


    cout << "-----------------Test 4--------------------" << endl;


    cout << "-----------------Test 5--------------------" << endl;



}
